// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false

// 引入elementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 引入store
import store from './store';

// 引入动画 animate.css
import "animate.css";

// 引入axios
import axios from 'axios';
// 配置axios访问路径，发送请求时自动加上前缀
axios.defaults.baseURL = "http://60.205.247.68:9001/"

// 配置图片默认访问路径
Vue.prototype.$imageUrl ="http://60.205.247.68:9001/image/"
Vue.prototype.$videoUrl="http://60.205.247.68:9001/video/"

// 设置post请求体
axios.defaults.headers.post['Content-Type'] = 'application/json' //设置post请求的请求头，数据传输格式

// 配置全局axios，所有vc及vm都可以直接使用$axios调用axios
Vue.prototype.$axios = axios



/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    components: { App },
    store,
    beforeCreate() {
        Vue.prototype.$bus = this;
    },
    template: '<App/>'
})
